home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / misc / sortham.lzh / sortham.readme < prev    next >
Encoding:
Text File  |  1992-06-15  |  3.1 KB  |  90 lines

  1. sortham     Sort an input file containing an amateur radio call sign in
  2.         column 1.  Version 1.0 05/30/92 Freeware by Vince Herried, KA8CTE.
  3.         This version should work on AmigaDos versions 1.0 and greater.
  4.         It has only been tested on AmigaDos V2.04.
  5.  
  6.         Amateur call signs are assumed to be less than 7 characters in
  7.         length of the following format.
  8.         PNS - where the prefix P is one or two alphabetic characters,
  9.           where the number N is a digit from 0 to 9, and
  10.           the suffix S is one to three characters.
  11.  
  12.  
  13.         THEORY OF OPERATION
  14.  
  15.         The program doesn't actually sort the input lines, rather it
  16.         sorts pointers to the input lines.    Memory is allocated for
  17.         the input file and for the pointers (one needed for each line).
  18.  
  19.         As the file is read in, a null character is added at the
  20.         end of each line, thus the input buffer needs to be larger
  21.         than the actual file size.
  22.  
  23.         Aztec's Manx C qsort is called with a comparison exit.
  24.  
  25.         The comparison exit builds a work area for each call sign
  26.         and re-arranges it (use the above notation) NSP or number,
  27.         suffix,prefix.  It then uses a standard C compare and returns
  28.         to the qsort exit.
  29.  
  30.         RESTRICTIONS
  31.  
  32.         Input lines longer than 255 characters are truncated.
  33.  
  34.         Call signs are less than seven characters long.
  35.  
  36.         This version requires the call sign to be in column one.
  37.         Version two will probably allow the call sign to be embedded.
  38.  
  39.         Ya get what you pay for, if it don't work for you, well
  40.         I'm sorry, it works ok for me.
  41.  
  42.  
  43.         ERROR MESSAGES
  44.  
  45.  
  46.            "SRTH001E: can't access FILENAME"
  47.              Selfexplainatory, I hope.    Misspelled file name?
  48.  
  49.            "SRTH002I - ta =%s, tb =%s"
  50.              Debugging info, you'll never see this.
  51.  
  52.            "SRTH003E - open failed for FILENAME"
  53.              Unable to open input file (read protected?)
  54.  
  55.            "SRTH004E - Unable to allocate memory for data buffer!"
  56.              you don't have enough free system memory available
  57.              to hold the input file.  Try breaking the file up
  58.              into multiple parts.
  59.  
  60.            "SRTH005E - Unable to allocate memory for pointer buffer!"
  61.              sortham also needs a bunch of memory pointers.
  62.              Maybe V2 will be a little bit smarter, this version
  63.              assumes that each line is very short, thus if your
  64.              data lines are more than 8 characters long it
  65.              allocates more memory for this buffer than
  66.              it needs.    I did this rather than make multiple
  67.              passes on the data or require you to enter an average
  68.              line size.  Try breaking the file up into multiple parts.
  69.  
  70.            "SRTH006E - oops it doesn't fit?"
  71.              I guessed wrong on the size of the buffer needed for
  72.              the input file.  Probably because the file is very short
  73.              and or all input lines are are very short eg 1x2.
  74.              Pad one line out with text to make it longer (20 - 30
  75.              characters should do it).
  76.  
  77.            "SRTH007E - oops not enough room in the pointer buffer!"
  78.              Same problem SRTH007E.  Pad a line out with text to
  79.              make it longer.
  80.  
  81.  
  82.  
  83.  
  84.         Address Comments to:
  85.         Vincent Herried  KA8CTE
  86.         1688 Staffordshire RD.
  87.         Columbus, OH. 43229-2142
  88.  
  89.  
  90.